(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__and(tt, X) → mark(X)
a__length(nil) → 0
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeros → zeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
Q is empty.
(1) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Polynomial interpretation [POLO]:
POL(0) = 0
POL(a__and(x1, x2)) = 1 + x1 + 2·x2
POL(a__length(x1)) = x1
POL(a__zeros) = 0
POL(and(x1, x2)) = 1 + x1 + 2·x2
POL(cons(x1, x2)) = 2·x1 + 2·x2
POL(length(x1)) = x1
POL(mark(x1)) = 2·x1
POL(nil) = 2
POL(s(x1)) = x1
POL(tt) = 2
POL(zeros) = 0
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
a__and(tt, X) → mark(X)
a__length(nil) → 0
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(tt) → tt
mark(nil) → nil
(2) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__zeros → zeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
Q is empty.
(3) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Polynomial interpretation [POLO]:
POL(0) = 0
POL(a__and(x1, x2)) = 2 + 2·x1 + x2
POL(a__length(x1)) = 2 + 2·x1
POL(a__zeros) = 2
POL(and(x1, x2)) = 1 + x1 + x2
POL(cons(x1, x2)) = x1 + 2·x2
POL(length(x1)) = 1 + 2·x1
POL(mark(x1)) = 2·x1
POL(s(x1)) = x1
POL(zeros) = 1
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
a__zeros → zeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)
(4) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
Q is empty.
(5) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Polynomial interpretation [POLO]:
POL(0) = 0
POL(a__length(x1)) = x1
POL(a__zeros) = 0
POL(cons(x1, x2)) = x1 + 2·x2
POL(length(x1)) = 1 + 2·x1
POL(mark(x1)) = x1
POL(s(x1)) = 2·x1
POL(zeros) = 0
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
mark(length(X)) → a__length(mark(X))
(6) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
Q is empty.
(7) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Polynomial interpretation [POLO]:
POL(0) = 0
POL(a__length(x1)) = 2·x1
POL(a__zeros) = 2
POL(cons(x1, x2)) = 2 + x1 + x2
POL(mark(x1)) = 2 + x1
POL(s(x1)) = x1
POL(zeros) = 0
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
mark(0) → 0
(8) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
Q is empty.
(9) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Polynomial interpretation [POLO]:
POL(0) = 0
POL(a__length(x1)) = 2·x1
POL(a__zeros) = 2
POL(cons(x1, x2)) = 2 + x1 + 2·x2
POL(mark(x1)) = 2 + 2·x1
POL(s(x1)) = x1
POL(zeros) = 0
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
mark(cons(X1, X2)) → cons(mark(X1), X2)
(10) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))
Q is empty.
(11) Overlay + Local Confluence (EQUIVALENT transformation)
The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.
(12) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))
The set Q consists of the following terms:
a__zeros
a__length(cons(x0, x1))
mark(zeros)
mark(s(x0))
(13) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
A__LENGTH(cons(N, L)) → MARK(L)
MARK(zeros) → A__ZEROS
MARK(s(X)) → MARK(X)
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))
The set Q consists of the following terms:
a__zeros
a__length(cons(x0, x1))
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(15) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 2 less nodes.
(16) Complex Obligation (AND)
(17) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MARK(s(X)) → MARK(X)
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))
The set Q consists of the following terms:
a__zeros
a__length(cons(x0, x1))
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(18) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(19) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MARK(s(X)) → MARK(X)
R is empty.
The set Q consists of the following terms:
a__zeros
a__length(cons(x0, x1))
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(20) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
a__zeros
a__length(cons(x0, x1))
mark(zeros)
mark(s(x0))
(21) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MARK(s(X)) → MARK(X)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(22) QDPSizeChangeProof (EQUIVALENT transformation)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.
From the DPs we obtained the following set of size-change graphs:
- MARK(s(X)) → MARK(X)
The graph contains the following edges 1 > 1
(23) YES
(24) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))
The set Q consists of the following terms:
a__zeros
a__length(cons(x0, x1))
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(25) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(26) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
The TRS R consists of the following rules:
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))
a__zeros → cons(0, zeros)
The set Q consists of the following terms:
a__zeros
a__length(cons(x0, x1))
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(27) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
a__length(cons(x0, x1))
(28) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
The TRS R consists of the following rules:
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))
a__zeros → cons(0, zeros)
The set Q consists of the following terms:
a__zeros
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(29) MRRProof (EQUIVALENT transformation)
By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented rules of the TRS R:
mark(s(X)) → s(mark(X))
Used ordering: Polynomial interpretation [POLO]:
POL(0) = 0
POL(A__LENGTH(x1)) = 2·x1
POL(a__zeros) = 0
POL(cons(x1, x2)) = 2·x1 + 2·x2
POL(mark(x1)) = 2·x1
POL(s(x1)) = 1 + 2·x1
POL(zeros) = 0
(30) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
The TRS R consists of the following rules:
mark(zeros) → a__zeros
a__zeros → cons(0, zeros)
The set Q consists of the following terms:
a__zeros
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(31) Narrowing (EQUIVALENT transformation)
By narrowing [LPAR04] the rule
A__LENGTH(
cons(
N,
L)) →
A__LENGTH(
mark(
L)) at position [0] we obtained the following new rules [LPAR04]:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(a__zeros)
(32) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(a__zeros)
The TRS R consists of the following rules:
mark(zeros) → a__zeros
a__zeros → cons(0, zeros)
The set Q consists of the following terms:
a__zeros
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(33) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(34) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(a__zeros)
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
The set Q consists of the following terms:
a__zeros
mark(zeros)
mark(s(x0))
We have to consider all minimal (P,Q,R)-chains.
(35) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
mark(zeros)
mark(s(x0))
(36) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(a__zeros)
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
The set Q consists of the following terms:
a__zeros
We have to consider all minimal (P,Q,R)-chains.
(37) Rewriting (EQUIVALENT transformation)
By rewriting [LPAR04] the rule
A__LENGTH(
cons(
y0,
zeros)) →
A__LENGTH(
a__zeros) at position [0] we obtained the following new rules [LPAR04]:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(cons(0, zeros))
(38) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(cons(0, zeros))
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
The set Q consists of the following terms:
a__zeros
We have to consider all minimal (P,Q,R)-chains.
(39) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(40) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(cons(0, zeros))
R is empty.
The set Q consists of the following terms:
a__zeros
We have to consider all minimal (P,Q,R)-chains.
(41) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
a__zeros
(42) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(y0, zeros)) → A__LENGTH(cons(0, zeros))
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(43) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
A__LENGTH(
cons(
y0,
zeros)) →
A__LENGTH(
cons(
0,
zeros)) we obtained the following new rules [LPAR04]:
A__LENGTH(cons(0, zeros)) → A__LENGTH(cons(0, zeros))
(44) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(0, zeros)) → A__LENGTH(cons(0, zeros))
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(45) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.
s =
A__LENGTH(
cons(
0,
zeros)) evaluates to t =
A__LENGTH(
cons(
0,
zeros))
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Matcher: [ ]
- Semiunifier: [ ]
Rewriting sequenceThe DP semiunifies directly so there is only one rewrite step from A__LENGTH(cons(0, zeros)) to A__LENGTH(cons(0, zeros)).
(46) NO